package com.example.demo.dto;

import java.util.List;

/**
 * 数据源搜索配置DTO
 * 用于返回数据源的搜索和下拉配置信息
 */
public class DataSourceSearchConfigDTO {
    private Long dataSourceId;               // 数据源ID
    private String dataSourceName;           // 数据源名称
    private List<DropdownFieldConfig> dropdownFields;    // 下拉字段配置
    private List<SearchableFieldConfig> searchableFields; // 搜索字段配置
    
    public Long getDataSourceId() {
        return dataSourceId;
    }
    
    public void setDataSourceId(Long dataSourceId) {
        this.dataSourceId = dataSourceId;
    }
    
    public String getDataSourceName() {
        return dataSourceName;
    }
    
    public void setDataSourceName(String dataSourceName) {
        this.dataSourceName = dataSourceName;
    }
    
    public List<DropdownFieldConfig> getDropdownFields() {
        return dropdownFields;
    }
    
    public void setDropdownFields(List<DropdownFieldConfig> dropdownFields) {
        this.dropdownFields = dropdownFields;
    }
    
    public List<SearchableFieldConfig> getSearchableFields() {
        return searchableFields;
    }
    
    public void setSearchableFields(List<SearchableFieldConfig> searchableFields) {
        this.searchableFields = searchableFields;
    }
    
    /**
     * 下拉字段配置
     */
    public static class DropdownFieldConfig {
        private String name;                 // 字段名
        private String label;                // 显示标签
        private List<String> options;        // 可选项列表
        
        public String getName() {
            return name;
        }
        
        public void setName(String name) {
            this.name = name;
        }
        
        public String getLabel() {
            return label;
        }
        
        public void setLabel(String label) {
            this.label = label;
        }
        
        public List<String> getOptions() {
            return options;
        }
        
        public void setOptions(List<String> options) {
            this.options = options;
        }
    }
    
    /**
     * 搜索字段配置
     */
    public static class SearchableFieldConfig {
        private String name;                 // 字段名
        private String type;                 // 搜索类型：dropdown, fuzzy
        private String label;                // 显示标签
        
        public String getName() {
            return name;
        }
        
        public void setName(String name) {
            this.name = name;
        }
        
        public String getType() {
            return type;
        }
        
        public void setType(String type) {
            this.type = type;
        }
        
        public String getLabel() {
            return label;
        }
        
        public void setLabel(String label) {
            this.label = label;
        }
    }
}